package indi.cyh.fastservice.controller;

/**
 * @ClassName BaseErrorPage
 * @Description TODO
 * @Author CYH
 * @Date 2022/12/1 11:45
 */

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 方法1：Spring Boot 将所有的错误默认映射到/error， 实现ErrorController
 * @author cjj
 *
 */
@Controller
@RequestMapping("/error")
public class BaseErrorPage implements ErrorController {
    @Override
    public String getErrorPath() {
        return "500.html";
    }
}
